package com.sc.nft.feign;


import com.sc.nft.dto.IdRequest;
import com.sc.nft.dto.SendMessageMassReq;
import com.sc.nft.dto.SendMessageOneReq;
import com.sc.nft.req.TencentSendSmsReq;
import com.sc.nft.sup.Result;
import com.sc.nft.vo.LdyMessageTemplateVO;
import com.sc.nft.vo.LdySendMassVO;
import com.sc.nft.vo.LdySendOneVO;
import com.sc.nft.vo.TencentSendVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 短信服务feign聚合
 */
@FeignClient(name = "meta-sms",path = "/sms")
public interface SmsFeignClient {

    /**
     * 批量发送短信
     * @param sendMessageMassReq
     * @return
     */
    @Deprecated
    @PostMapping(value = "/sendMessageMass", produces = MediaType.APPLICATION_JSON_VALUE)
    Result<LdySendMassVO> sendMessageMass(@RequestBody SendMessageMassReq sendMessageMassReq);

    /**
     * 短信一对一发送接口
     * @param sendMessageOneReq
     * @return
     */
    @Deprecated
    @PostMapping(value = "/sendMessageOne", produces = MediaType.APPLICATION_JSON_VALUE)
    Result<List<LdySendOneVO>> sendMessageOne(@RequestBody SendMessageOneReq sendMessageOneReq);

    /**
     * 短信模版
     * @param idRequest
     * @return
     */
    @Deprecated
    @PostMapping(value = "/messageTemplateList", produces = MediaType.APPLICATION_JSON_VALUE)
    Result<List<LdyMessageTemplateVO>> getMessageTemplateList(@RequestBody IdRequest idRequest);


    /**
     * 定时任务处理短信回执
     * @return
     */
    @Deprecated
    @PostMapping(value = "/getReport", produces = MediaType.APPLICATION_JSON_VALUE)
    Result getReport();

    /**
     *  腾讯发送短信
     *
     * @param tencentSendSmsReq
     * @return
     */
    @PostMapping("/tencent/send")
    Result<TencentSendVO> tencentSend(@RequestBody TencentSendSmsReq tencentSendSmsReq);

}
